Skip to content

feat(hotas): Refactor HOTAS to support variants - #170

Open
Menithal wants to merge 2 commits into
ExpiredPopsicle:mainfrom
Menithal:hotas-improvements
Open

feat(hotas): Refactor HOTAS to support variants#170
Menithal wants to merge 2 commits into
ExpiredPopsicle:mainfrom
Menithal:hotas-improvements

Conversation

@Menithal

@Menithal Menithal commented May 3, 2026

Copy link
Copy Markdown
  • Added twist Axis to existing sticks
  • Added an "Omni Stick" or a Joystick with an Angle, based on existing models
  • Added Left and Right variants of all sticks.
  • Omni and regular Variants of the stick are combined into the single model file to save on space as glb unpacking keeps the textures separate
    • Scenes determine what parts of the mesh is loaded
  • Supports ontop of HOTAS support, supports HOSAS (Hands of Stick and Stick), HOTAT (Hands on Throttle and Throttle) and Single stick/throttle variants
    • Future proofing for additional device or stick variant supports, perhaps even 3Dconnexion spacenavigator.
  • Supports Now 3 Axis of input per device. What is and what is not possible to do with a device is determined by the animation tree of the device (See Stick vs Throttle)
  • Allows Customization of Input directions incase swapping sides

- Added an "Omni Stick" or a Joystick with an Angle, based on existing models
- Left and Right variants combined
- Supports HOSAS, HOTAS, and Single stick variants
- Supports Now 3 Axis of input per device
- Allows Customization of Input directions incase swapping sides
Comment thread Mods/Base/Mod_Base.gd Outdated
var existing_settings = save_settings()
existing_settings[setting_name] = value
load_settings(existing_settings)
on_settings_update.emit()

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of creating a new signal for the updates, can you just call _on_settings_update() from an overridden version of this function?

@Menithal Menithal Aug 1, 2026

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will give it a shot; Had it like this as it was not that clear that I could do such when i wrote it

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah thats a much more elegant solution, not sure why I completely missed the fact that I could override it, completely not used GDScript at all. reverted the Mod_Base.gd and just overwrote the setting function

@copygirl copygirl left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

class_name in mods itself is not problematic but mods loaded at runtime can't refer to other mod scripts defined with a global class name, nor can you statically type variables holding types from mods. See also: godotengine/godot#98985

As such I recommend removing all uses of class_name and fixing resulting errors from the identifier not being found, and either removing the type altogether or using a known non-mod super type (for example Node3D or Mod_Base). You could also add the intended type name as a comment.

I also think there might be an issue with preload. It may have to be replaced with load.

Would it be possible for you to test your PR by exporting the project and then running the exported version and ensure all aspects of the mod still work?

@copygirl

copygirl commented Aug 3, 2026

Copy link
Copy Markdown
Collaborator

It also looks like the assets for this mod, combined, are quite large, somewhere around 100MB for the released version.

Here's my current thoughts:

  • If this were to be merged, the newly added assets should be optimized to avoid bloating the git repository.
    Also, we need to make sure to squash the commits, otherwise the larger AND optimized versions end up included.
  • In the future, the existing assets should be optimized too, to lower the release size.
  • Alternatively, for a mod that likely few people are going to use anyway, it may be best to move it into a separate repository and release it as its own thing, rather than it be included by default. This way, asset sizes are less of a concern.

@copygirl
copygirl dismissed their stale review August 4, 2026 13:33

Since the addition of UIDs, this may not be 100% true any longer.

@copygirl

copygirl commented Aug 4, 2026

Copy link
Copy Markdown
Collaborator

What I think is happening now is that scripts now also have a UID and perhaps referencing them in scene files registers them appropriately:

[ext_resource type="Script" uid="uid://lwu6r6cpya84" path="res://Mods/HOTAS/HOTAS.gd" id="1_spc0m"]
[ext_resource type="Script" uid="uid://cw34v07h3wecw" path="res://Mods/HOTAS/DeviceSlot.gd" id="2_flrom"]

If I had to guess there might still be issues where script are purely referenced by name and never mentioned/defined in a scene file, but who knows?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants